//
// Created by User on 24-10-5.
//

#ifndef AUDIO_CONFIG_HPP
#define AUDIO_CONFIG_HPP

#include <string>

namespace utils
{
    class audio_config
    {
    public:
        audio_config(const audio_config&) = default;

        audio_config(audio_config&&) = default;

        audio_config& operator=(const audio_config&) = default;

        audio_config& operator=(audio_config&&) = default;

        static audio_config copy_stream()
        {
            audio_config config;
            config.m_is_copy_stream = true;
            return config;
        }

        static audio_config config(const std::string& encode, int bitrate, int sample_rate)
        {
            audio_config config;
            config.encode = encode;
            config.m_is_copy_stream = false;
            config.m_bitrate = bitrate;
            config.m_sample_rate = sample_rate;
            return config;
        }

        const std::string& get_encode() const { return this->encode; }

        bool is_copy() const { return this->m_is_copy_stream; }

        int get_bitrate() const { return this->m_bitrate; }

        int get_sample_rete() const { return this->m_sample_rate; }

    private:
        audio_config() = default;

    private:
        std::string encode{};
        bool m_is_copy_stream{};
        int m_bitrate{};
        int m_sample_rate{};
    };
}

#endif //AUDIO_CONFIG_HPP
